package chapter04.exam28;

public class exam28 {
    public static void main(String[] args) {
        //下面的代码定义了一个try...catch语句用于捕获异常
        try{
            int result = divide(4,2);
            System.out.println(result);
        }catch (Exception e){
            e.printStackTrace();
        }
    }
    public static int divide (int x,int y)throws Exception{
        int result = x/y;
        return result;
    }
}
